import { createStore } from 'vuex'

export default createStore({
  state: {
    backgroundColor: 'black',
    width: 4,
    circle: {
      x: 0,
      y: 0,
      radius: 1,
      fill: '#a9a9a9',
      stroke: '#a9a9a9',
      strokeWidth: 1,
      draggable: true
    },
    arrow: {
      x: 0,
      y: 0,
      pointerLength: 0,
      pointerWidth: 0,
      // fill: 'black',
      stroke: '#a9a9a9',
      lineJoin: 'round',
      strokeWidth: 4,
      tension: 9
    },
    nowClassName: '', // 当前工具的名字
    blockSnapSize: 50, // 背景表格大小
  },
  mutations: {
    // 更改nowClassName
    changeClassName(state, action) {
      console.log(state, action)
      state.nowClassName = action.className
    }
  },
  actions: {
  },
  modules: {
  }
})
